﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LogSystem
{
    // LoggerDecorator.cs
   
    public class LoggerDecorator : ILogger
    {
        private readonly ILogger _wrappedLogger;

        public LoggerDecorator(ILogger wrappedLogger)
        {
            _wrappedLogger = wrappedLogger;
        }

        public void Log(string message)
        {
            string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            string messageWithTimestamp = $"{timestamp} - {message}";
            _wrappedLogger.Log(messageWithTimestamp);
        }
    }

}
